import java.io.*;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: lishuo
 * Date: 2023-04-18
 * Time: 23:55
 */
public class IOdemo8 {
    public static void main(String[] args) {
        try (Reader reader = new FileReader("test.txt")) {
            while (true) {
                int c = reader.read();
                if (c==-1) {
                    break;
                }
                System.out.println((char)c);
            }
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
